<!doctype html>
<html><!-- InstanceBegin template="/Templates/cloud.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=640, initial-scale=0.5, minimum-scale=0.5, maximum-scale=0.5">
<!-- InstanceBeginEditable name="doctitle" -->
<title>智能云管家-我的业务</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="EditRegion-jscode" -->
<script type="text/javascript" src="resources/appMobi-jQ.Mobi-3d025ab/jq.mobi.min.js"></script>
<script type="text/javascript" src="resources/appMobi-jQ.Mobi-3d025ab/plugins/jq.fx.js"></script>
<script type="text/javascript" src="resources/appMobi-jQ.Mobi-3d025ab/plugins/jq.css3animate.js"></script>
<script type="text/javascript" src="resources/js/common.js"></script>
<script type="text/javascript">
var localStr=window.location.href;
var businessId="";
$(function(){
    addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false);
	addEventListener("orientationchange", function() { setTimeout(hideURLbar, 0); }, false);
	addEventListener("load",function(){$("#loading").hide();
	$(".floatBoxBg").hide();}); 
      function hideURLbar(){ 
               window.scrollTo(0,1); 
      }
      if(navigator.userAgent.toLowerCase().indexOf("android", 0)<0){
         $("#footer").css({"center;z-index":"999","position":"fixed","bottom":"0"});
         window.scrollTo(0,1); 
        }else{
        $("#footer").css({"position":"fixed","bottom":"0"});
    var top = $("#footer").offset().top;
    if(localStr.indexOf("file:///",0)<0)
	{
	    $(window).scroll(function(){
	    $("#footer").offset({top:$(document).scrollTop()+top});
	    });
	}
 }

       }); 
$(document).ready(function(e) {
	//logincheck();
	if(localStr.indexOf("file:///",0)<0&&detectDeviceType()=="Android"){
		$("#client").hide();
		$("#dlclient").show();
	}else{
		$("#client").show();
		$("#dlclient").hide();
	}
	$("#phoneNum").text(localStorage.getItem("curphone"));
	$("#userNm").text(localStorage.getItem("username"));
    var url1=jsonserver+"business/orderpackage/phone/"+localStorage.getItem("curphone")+"/phonekey/"+localStorage.getItem("userkey");
	$.getJSON(url1+".jsonp?callback=?",{},function(data){
		errorcheck(data.sb.status,data.sb.msg);
		$("#nowNm").append('<table width="100%" height="83px" border="0"><tr><td>'+data.proname+'</td><td width="73px"><img  id="nowNmopenFlag" src="resources/css/images/buybusiness/images/up.png"/></td></tr></table>');
		$("#nowNm_det").append(data.tablestr);
		});
		$("#nowNm").bind("click",function(){upordown("nowNm");});
	var url2=jsonserver+"business/orderbusi/phone/"+localStorage.getItem("curphone");
	$.getJSON(url2+".jsonp?callback=?",{},function(data){
		errorcheck(data.sb.status,data.sb.msg);
		var showstr=data.tablestr;
		if(null==data.tablestr)
		{
			showstr='尊敬的用户,你没有订购任何附属套餐.';
		}
		$("#nowBusiness").append('<div id="nowPackage" style="background-image:url(resources/css/images/mybusiness/images/list_bg.png); height:83px; line-height:83px; font-size:32px"><table width="100%" height="83px" border="0"><tr><td>附属套餐</td><td width="73px"><img  id="nowPackageopenFlag" src="resources/css/images/buybusiness/images/down.png"/></td></tr></table></div><div id="nowPackage_det" style="font-size:26px; line-height:50px; overflow:hidden">'+showstr+'</div>');
		$("#nowPackage").bind("click",function(){upordown("nowPackage");});
		$("#nowPackage_det").hide();
	});
	if(localStorage.getItem("newuser")=="yes"||localStorage.getItem("special")=="yes") {
		$("#recommon").append('<div style="font-size:28px">尊敬的用户，建议您继续使用当前套餐。</div>');
		$("#orderBtn").hide();	
	}else{
	var url3=jsonserver+"business/recunion/phone/"+localStorage.getItem("curphone");
	$.getJSON(url3+".jsonp?callback=?",{},function(data){
		
		errorcheck(data.sb.status,data.sb.msg);
		if(data.special=="yes")
		{
			$("#recommon").append('<div style="font-size:28px">尊敬的用户，建议您继续使用当前套餐。</div>');
			$("#orderBtn").hide();	
		}
		else
		{
			$.each(data.recunionlist,function(i,field){
				$("#recommon").append('<div id='+field.pid+' style="background-image:url(resources/css/images/mybusiness/images/list_bg.png); height:83px; line-height:83px; font-size:32px"><table width="100%" height="83px" border="0"><tr><td>'+field.proname+'</td><td width="73px"><img  id='+field.pid+"openFlag"+' src="resources/css/images/buybusiness/images/down.png"/></td></tr></table></div>');
				$("#"+field.pid).bind("click",function(){upordown(field.pid);});
				$("#recommon").append('<div id='+field.pid+"_det"+' class="recommon_table" style="font-size:26px; line-height:50px; overflow:hidden">'+field.tablestr+'</div>');
				$("#"+field.pid+"_det").hide();
				if(i=0){
				businessId=businessId+field.pid;
			}else{
				businessId=businessId+","+field.pid;
				}
			});
		}
		});
	}
	
});
function upordown(divId) {
	if($("#"+divId+"_det").get(0).style.display=="none"){
			$("#"+divId+"openFlag").attr("src","resources/css/images/buybusiness/images/up.png");
		}else{
			$("#"+divId+"openFlag").attr("src","resources/css/images/buybusiness/images/down.png");
		}
		$("#"+divId+"_det").slideToggle();
	}
if(localStorage.getItem("width")==null){
		localStorage.setItem("width",window.screen.width);
		localStorage.setItem("height",window.screen.height);
	}
	if(localStorage.getItem("width")>700) {
		$("meta").attr("content","width=device-width, initial-scale=0.7, minimum-scale=0.7, maximum-scale=0.7");
	}
	if(window.screen.height>window.screen.width){
		Vertical();
	}
	$( window ).bind( "orientationchange", function() {
		changeScreen();
		});
function changeScreen(){
	if(window.screen.height>window.screen.width){
		Vertical();
		} 
	else {
		$("#content").removeAttr("style");
		$("#mainconfig").removeAttr("style");
	}
	}
function Vertical(){
	var screenheigh = localStorage.getItem("height");
	if(screenheigh<=500){
		$("#mainconfig").height(650);
	}
	else if(screenheigh>1100){
		$("#content").height(0.8*screenheigh);
		$("#mainconfig").height(0.63*screenheigh);
	}
	else{
		$("#content").height(1000);
		$("#mainconfig").height(1.17*screenheigh);
	}
	}
function businessHandle(){
	$("#handletip").remove();
		url=jsonserver+"business/handlebusi/phone/"+localStorage.getItem("curphone")+"/idlist/"+businessId;
		$.getJSON(url+".jsonp?callback=?",{},function(data){
			$("#handle").append('<div id="handletip" style="color:red; font-size:24px; text-align:center">'+data.sb.msg+'</div>');
		});
}
function confirmation() {
	var itop=(document.body.clientHeight )/2-100;
        var ileft=(document.body.clientWidth )/2-150;
	$("body").append('<div id="popup" class="floatBoxBg"></div>');
	$("body").append('<div id="confirmwindow" style="z-index:9999;background-color:white; text-align:center; font-size:24px; line-height:100px"><div>是否确定订购此套餐组合？</div><input type="button" value="确认" onclick="yes()"/><input type="button" value="取消" onclick="no()"/></div>');
	var o=$("#confirmwindow");
	o.css({
			width:"300px",
			height:"200px",
            position:"absolute",
            top:itop+"px",
            left:ileft+"px"
        });
	}
	
function yes(){
	$("#confirmwindow").remove();
	$("#popup").remove();
	businessHandle();
	}
function no(){
	$("#confirmwindow").remove();
	$("#popup").remove();
	}
</script>
<style type="text/css">
#content{
	height:1000px;
	}

table {
   border:0; 
    
}
#tab li
{
	line-height:30px;
}
#nowNm_det table td {
   border-top-width: 0px;
   border-right-width: 2px;
   border-bottom-width: 2px;
   border-left-width: 0px;
   border-top-style: dashed;
   border-right-style: dashed;
   border-bottom-style: dashed;
   border-left-style: dashed;
   border-color:#CCC;
   
   padding-top: 0px;
   padding-right: 0px;
   padding-bottom:0px;
   padding-left: 0px;
}
#nowPackage_det table td {
	text-align:center;
   border-top-width: 0px;
   border-right-width: 2px;
   border-bottom-width: 2px;
   border-left-width: 0px;
   border-top-style: dashed;
   border-right-style: dashed;
   border-bottom-style: dashed;
   border-left-style: dashed;
   border-color:#CCC;
   
   padding-top: 0px;
   padding-right: 0px;
   padding-bottom:0px;
   padding-left: 0px;
}

.recommon_table table td {
	text-align:center;
   border-top-width: 0px;
   border-right-width: 2px;
   border-bottom-width: 2px;
   border-left-width: 0px;
   border-top-style: dashed;
   border-right-style: dashed;
   border-bottom-style: dashed;
   border-left-style: dashed;
   border-color:#CCC;
   
   padding-top: 0px;
   padding-right: 0px;
   padding-bottom:0px;
   padding-left: 0px;
}
.floatBoxBg{
	width:100%;
	height:300%;
	background:#181e2a;
	filter:alpha(opacity=50);
	opacity:0.5;
	position:absolute;
	top:0;left:0;
	z-index: 999;
	text-align:center;
	vertical-align:central;
	}

</style>
<link href="resources/css/load.css" rel="stylesheet" type="text/css">
<!-- InstanceEndEditable -->
<style type="text/css">
*{
	font-family:Heiti SC;
}
</style>
	<script type="text/javascript">
//var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
//document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F2284c04845acdcd94dd640a8555927dc' type='text/javascript'%3E%3C/script%3E"));
</script>
</head>

<body style="margin:0;">

	<div id="header">
	<!-- InstanceBeginEditable name="EditRegion-header" -->
    <div style="width:100%; background-image:url(resources/css/images/top_bg.jpg); height:88px"><table width="100%" height="88px" border="0">
  <tr>
    <td style="width:18%; max-width:110px; padding-left:5px"><img src="resources/css/images/warning/images/fanhui.png" width="90%" style="max-width:99px" onClick="javascript:window.location.href='index.html'"/></td>
    <td style="text-align: center; font-size: 40px;">我的业务</td>
    <td width="18%" style="max-width:max-width:110px; padding-right:5px">&nbsp;</td>
  </tr>
</table>

    </div>
	<!-- InstanceEndEditable -->
    </div>
    <div id="content">
    <div id="loading" class="loading"><img src="resources/css/images/loading.gif"/>载入中...</div>
    <div class="floatBoxBg"></div>
	<!-- InstanceBeginEditable name="EditRegion-content" -->
    <div style="background-color:#000; color:#e8bb08; font-size:32px; height:87px">
    <table width="100%" height="87px" border="0">
  <tr>
    <td width="41%"><span style="color:#FFF">&nbsp;&nbsp;姓名:</span><span id="userNm"></span></td>
    <td style="text-align:right; padding-right:10px" width="59%"><span style="color:#FFF">手机:</span><span id="phoneNum"></span></td>
  </tr>
</table>
    </div>
    <div style="background-color: #FFF; height: 66px; line-height: 66px; font-size: 36px; color: #896f08;">&nbsp;当前使用业务：</div>
    <div id="nowBusiness">
    <div id="nowNm" style="background-image:url(resources/css/images/mybusiness/images/list_bg.png); height:83px; line-height:83px; font-size:32px">
    </div>
    <div id="nowNm_det" style="font-size:26px; line-height:50px; overflow:hidden">
    </div>
    
    </div>
    <div style="background-color: #FFF; height: 66px; line-height: 66px; font-size: 36px; color: #896f08;">&nbsp;推荐套餐组合：</div>
    <div id="recommon">
    <div>
    
    </div>
    </div>
    
    <div id="handle" style="height:80px; text-align:center; padding-top:20px">
    <img id="orderBtn" src="resources/css/images/mybusiness/images/my_btn.png" onClick="confirmation()"/>
    </div>
      <div id="foot" style="font-size: 24px; max-height:80px; padding:10px; text-align:center; background-image:url(resources/css/images/bottom_share_bg.png)"><div id="foot" style="margin-left: 10px; font-size: 24px; width:100%"><table width="100%" border="0">
  <tr>
    <td width="15%"><div style="max-width:101px"><img src="resources/css/images/system/images/share_btn.png" width="100%" onClick="javascript:window.location.href='share.html'"/></div></td>
    <td><div id="dlclient" onClick="download()">下载云管家客户端，更多给力功能</div><div id="client">COOL！流量变化随时掌握</div></td>
  </tr>
</table>
</div>
   </div>

	<!-- InstanceEndEditable -->
    </div>
    <!-- InstanceBeginEditable name="EditRegion-footer" --><!-- InstanceEndEditable -->
    <div id="footer">
    </div>
    
</body>
<!-- InstanceEnd --></html>
